-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding TemplateSource resource #386
Conversation
b598991
to
959bf2a
Compare
959bf2a
to
b90e500
Compare
replaceProperties := map[string]bool{ | ||
"organizationName": true, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just for my own knowledge why do we always replace organizationName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if organizationName
changes, we can't update the resource, like, a TemplateSource created in one org, cannot be moved into another org.
So we have to delete old one and make new one in new org
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok - sorry the naming here threw me. These are properties that will trigger a replacement requirement no properties to replace.
// This sucks, but there's not Get API for Template Sources | ||
// Thus, using a List and then finding by ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a TODO with a ticket in pulumi-service to track adding one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added https://github.com/pulumi/pulumi-service/issues/21637, good point!
} | ||
} | ||
|
||
return nil, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not entirely sure of the pattern here but if we can't find a template source do we want to raise an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to throw an error here, for example during refresh we expect it to be not found (if user deleted the template source, causing a drift)
I mean, I could refactor this to return NotFound error here instead and have caller handle that, but imho this way is better, since there was no error calling API, just nothing (nil) found
Summary
Testing